home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / DBio.more / USeqPrint.h < prev   
Text File  |  1996-07-05  |  20KB  |  678 lines

  1. // USeqPrint.p 
  2. // by d.g.gilbert, 1992 for SeqApp 
  3.  
  4.  
  5. UNIT USeqPrint;
  6.  
  7. INTERFACE
  8.  
  9.  
  10. #ifndef __Types__
  11. #include <Types.h>
  12. #endif
  13.  
  14. #ifndef __Memory__
  15. #include <Memory.h>
  16. #endif
  17.  
  18. #ifndef __QuickDraw__
  19. #include <QuickDraw.h>
  20. #endif
  21.  
  22. #ifndef __ToolUtils__
  23. #include <ToolUtils.h>
  24. #endif
  25.  
  26. #ifndef __OSUtils__
  27. #include <OSUtils.h>
  28. #endif
  29.  
  30. #ifndef __Resources__
  31. #include <Resources.h>
  32. #endif
  33.  
  34. #ifndef __Packages__
  35. #include <Packages.h>
  36. #endif
  37.  
  38. #ifndef __Files__
  39. #include <Files.h>
  40. #endif
  41.  
  42. #ifndef __Printing__
  43. #include <Printing.h>
  44. #endif
  45.  
  46. #ifndef __TextEdit__
  47. #include <TextEdit.h>
  48. #endif
  49.  
  50. #ifndef __Fonts__
  51. #include <Fonts.h>
  52. #endif
  53.  
  54. #ifndef __SANE__
  55. #include <SANE.h>
  56. #endif
  57.  
  58. #ifndef __Controls__
  59. #include <Controls.h>
  60. #endif
  61.  
  62. #ifndef __Aliases__
  63. #include <Aliases.h>
  64. #endif
  65.  
  66. #ifndef __Editions__
  67. #include <Editions.h>
  68. #endif
  69.  
  70. #ifndef __Events__
  71. #include <Events.h>
  72. #endif
  73.  
  74. #ifndef __Notification__
  75. #include <Notification.h>
  76. #endif
  77.  
  78. #ifndef __AppleEvents__
  79. #include <AppleEvents.h>
  80. #endif
  81.  
  82. #ifndef __Processes__
  83. #include <Processes.h>
  84. #endif
  85.  
  86. #ifndef __Balloons__
  87. #include <Balloons.h>
  88. #endif
  89.  
  90. #ifndef __Scrap__
  91. #include <Scrap.h>
  92. #endif
  93.  
  94. #ifndef __MacAppTypes__
  95. #include <MacAppTypes.h>
  96. #endif
  97.  
  98. #ifndef __UPascalObject__
  99. #include <UPascalObject.h>
  100. #endif
  101.  
  102. #ifndef __UObject__
  103. #include <UObject.h>
  104. #endif
  105.  
  106. #ifndef __UEventHandler__
  107. #include <UEventHandler.h>
  108. #endif
  109.  
  110. #ifndef __UList__
  111. #include <UList.h>
  112. #endif
  113.  
  114. #ifndef __UAdorners__
  115. #include <UAdorners.h>
  116. #endif
  117.  
  118. #ifndef __UStream__
  119. #include <UStream.h>
  120. #endif
  121.  
  122. #ifndef __UGeometry__
  123. #include <UGeometry.h>
  124. #endif
  125.  
  126. #ifndef __UEvent__
  127. #include <UEvent.h>
  128. #endif
  129.  
  130. #ifndef __UCommand__
  131. #include <UCommand.h>
  132. #endif
  133.  
  134. #ifndef __UCommandHandler__
  135. #include <UCommandHandler.h>
  136. #endif
  137.  
  138. #ifndef __UView__
  139. #include <UView.h>
  140. #endif
  141.  
  142. #ifndef __UBehavior__
  143. #include <UBehavior.h>
  144. #endif
  145.  
  146. #ifndef __UTEView__
  147. #include <UTEView.h>
  148. #endif
  149.  
  150. #ifndef __UTECommands__
  151. #include <UTECommands.h>
  152. #endif
  153.  
  154. #ifndef __UMacAppUtilities__
  155. #include <UMacAppUtilities.h>
  156. #endif
  157.  
  158. #ifndef __UPatch__
  159. #include <UPatch.h>
  160. #endif
  161.  
  162. #ifndef __UFailure__
  163. #include <UFailure.h>
  164. #endif
  165.  
  166. #ifndef __UMacAppGlobals__
  167. #include <UMacAppGlobals.h>
  168. #endif
  169.  
  170. #ifndef __UFile__
  171. #include <UFile.h>
  172. #endif
  173.  
  174. #ifndef __UApplication__
  175. #include <UApplication.h>
  176. #endif
  177.  
  178. #ifndef __UPrintHandler__
  179. #include <UPrintHandler.h>
  180. #endif
  181.  
  182. #ifndef __UPrinting__
  183. #include <UPrinting.h>
  184. #endif
  185.  
  186. #ifndef __UWindow__
  187. #include <UWindow.h>
  188. #endif
  189.  
  190. #ifndef __UMenuMgr__
  191. #include <UMenuMgr.h>
  192. #endif
  193.  
  194. #ifndef __UMemory__
  195. #include <UMemory.h>
  196. #endif
  197.  
  198. #ifndef __UErrorMgr__
  199. #include <UErrorMgr.h>
  200. #endif
  201.  
  202. #ifndef __UControl__
  203. #include <UControl.h>
  204. #endif
  205.  
  206. #ifndef __UDialog__
  207. #include <UDialog.h>
  208. #endif
  209.  
  210. #ifndef __UPopup__
  211. #include <UPopup.h>
  212. #endif
  213.  
  214. #ifndef __UScroller__
  215. #include <UScroller.h>
  216. #endif
  217.  
  218. #ifndef __UDocument__
  219. #include <UDocument.h>
  220. #endif
  221.  
  222. #ifndef __UFileHandler__
  223. #include <UFileHandler.h>
  224. #endif
  225.  
  226. #ifndef __UFileBasedDocument__
  227. #include <UFileBasedDocument.h>
  228. #endif
  229.  
  230. #ifndef __UViewServer__
  231. #include <UViewServer.h>
  232. #endif
  233.  
  234. #ifndef __UGridView__
  235. #include <UGridView.h>
  236. #endif
  237.  
  238. #ifndef __UClipboardMgr__
  239. #include <UClipboardMgr.h>
  240. #endif
  241. USES
  242.     
  243.     /*$U $$Shell(UStd)UStandard.p */ UStandard, 
  244.     /*$U $$Shell(UStd)UMath.p */ UMath, 
  245.     /*$U $$Shell(UStd)UPlot.p */ UPlot, 
  246.     /*$U $$Shell(UStd)UApp.p */ UApp, 
  247.     /*$U $$Shell(UText)UTextDoc.p */ UTextDoc,
  248.     
  249.     USequence,
  250.     USeqReader,
  251.     USeqDoc();
  252.  
  253. TYPE
  254.  
  255.     TSeqPrintDocument        == OBJECT; FORWARD;
  256.     
  257.     TSeqPrintView            == OBJECT (TGridView)  
  258.         fSeq        : TSequence;  
  259.         integer        fFirstBase, fNBases; //index each TSequence
  260.  
  261.         fLeftName, fRightName, 
  262.         TCheckBox        fTopIndex, fLeftIndex, fRightIndex ;
  263.         TDlogTextView        fStyleName, fStyleBase, fStyleNums; 
  264.         TextStyle        fNameStyle, fNumStyle, fBaseStyle;
  265.  
  266.         fDoTopIndex, fDoLeftIndex, fDoRightIndex, 
  267.         boolean        fUseColor, fDoLeftName, fDoRightName;
  268.         Integer        fNameWidth, fIndexWidth, fBaseWidth;
  269.         Integer        fBasesPerLine, fTenSpacer;
  270.         
  271.         TSeqPrintDocument        fSeqPrintDocument;     
  272.  
  273.         pascal void TSeqPrintView::Initialize(void) // override 
  274.         pascal void TSeqPrintView::Free(void) // override 
  275.         pascal void TSeqPrintView::ISeqPrintView(TSeqPrintDocument itsDocument,
  276.                                     Boolean forClipboard)
  277.         pascal void TSeqPrintView::DoPostCreate(TDocument itsDocument) // override 
  278.         
  279.         pascal void TSeqPrintView::InstallControls(void)
  280.         pascal void TSeqPrintView::FindNameWidth(void)
  281.         pascal void TSeqPrintView::SetDrawOptions(void) 
  282.         
  283.         pascal void TSeqPrintView::DrawCell(GridCell aCell, VRect aRect) // override 
  284.         pascal void TSeqPrintView::DrawRangeOfCells(GridCell startCell, stopCell, VRect aRect) 
  285.                                                         // override 
  286.         pascal void TSeqPrintView::CalcMinFrame(VRect VAR minFrame) // override 
  287.         
  288.         pascal void TSeqPrintView::DoMenuCommand(CommandNumber aCommandNumber) // override 
  289.         pascal void TSeqPrintView::DoSetupMenus(void) // override 
  290.         }
  291.  
  292.     TSeqPrintWind            == OBJECT (TPrefWindow)
  293.         TButton        fRedrawBut;
  294.     
  295.         pascal void TSeqPrintWind::ISeqPrintWind(void)
  296.         pascal void TSeqPrintWind::SetPrefID(void) /* override */ 
  297.         pascal void TSeqPrintWind::DoEvent(EventNumber eventNumber, 
  298.                                             TEventHandler        source; TEvent event) // override 
  299.         }
  300.                             
  301.     TSeqPrintDocument        == OBJECT (TFileBasedDocument)
  302.         fSeqPrintView    : TSeqPrintView;
  303.         fSeqPrintWind    : TSeqPrintWind;
  304.         fParentDoc        : TDocument;
  305.         fSeq                    : TSequence;  
  306.         longint        fFirstBase, fNBases; //index each TSequence
  307.         fColorButton, fMonoButton    : TIcon;
  308.         
  309.         pascal void TSeqPrintDocument::ISeqPrintDocument(OSType fileType, TDocument parentDoc, 
  310.                                         TSequence        aSeq; longint startbase, nbases)
  311.         pascal void TSeqPrintDocument::Free(void) // override 
  312.         pascal void TSeqPrintDocument::FreeData(void) // override 
  313.         pascal void TSeqPrintDocument::Close(void) /* override */ 
  314.  
  315.         pascal void TSeqPrintDocument::DoMakeViews(Boolean forPrinting) // override 
  316.         pascal void TSeqPrintDocument::UntitledName(Str255 VAR noName) // override 
  317.         pascal TFile TSeqPrintDocument::DoMakeFile(CommandNumber itsCommandNumber) // override 
  318.         pascal void TSeqPrintDocument::DoNeedDiskSpace(TFile itsFile,
  319.                                                             long VAR dataForkBytes, rsrcForkBytes) // override 
  320.         pascal void TSeqPrintDocument::DoRead(aFile:TFile; Boolean forPrinting) // override 
  321.         pascal void TSeqPrintDocument::DoWrite(TFile aFile, Boolean makingCopy) // override 
  322.         }
  323.         
  324.         
  325.     TAlnPrintDocument        == OBJECT; FORWARD;
  326.                             
  327.     TAlnPrintWind            == OBJECT (TPrefWindow)
  328.         TButton        fRedrawBut;
  329.         TButton        fUserSelect, fUserNotSelect, fUserClear;
  330.         TNumberText        fCommonNumbers;
  331.     
  332.         pascal void TAlnPrintWind::IAlnPrintWind(void)
  333.         pascal void TAlnPrintWind::SetPrefID(void) /* override */ 
  334.         pascal void TAlnPrintWind::DoEvent(EventNumber eventNumber, 
  335.                                             TEventHandler        source; TEvent event) // override 
  336.         }
  337.         
  338.     TAlnPrintView            == OBJECT (TGridView) //was TView
  339.         fAlnList        : TSeqList; //list of TSequence in print view
  340.         integer        fNumSeqs, fFirstBase, fNBases; //index each TSequence
  341.         charsHandle        fCommonBases, fFirstCommon;
  342.         integer        fCommonPercent;        
  343.         RgnHandle        fUserSelection;
  344.  
  345.         TNumberText        fCommonNumbers;
  346.         fShadePop        : TPopup;
  347.         fLeftName, fRightName, 
  348.         TCheckBox        fTopIndex, fLeftIndex, fRightIndex ;
  349.         TCheckBox        fUseShade, fUseMatch;
  350.         fMatchSym    : TEditText;
  351.         TDlogTextView        fStyleName, fStyleBase, fStyleNums; 
  352.         TextStyle        fNameStyle, fNumStyle, fBaseStyle;
  353.  
  354.         fUseColor, fDoUseShading, fDoUseMatch,
  355.         fDoTopIndex, fDoLeftIndex, fDoRightIndex, 
  356.         boolean        fDoLeftName, fDoRightName;
  357.         fMatchChar    : Char;
  358.         Integer        fShadeStyle;
  359.         Integer        fNameWidth, fIndexWidth, fBaseWidth;
  360.         Integer        fBasesPerLine, fTenSpacer;
  361.         
  362.         TAlnPrintDocument        fAlnPrintDocument;     
  363.  
  364.         pascal void TAlnPrintView::Initialize(void) // override 
  365.         pascal void TAlnPrintView::Free(void) // override 
  366.         pascal void TAlnPrintView::IAlnPrintView(TAlnPrintDocument itsDocument,
  367.                                     Boolean forClipboard)
  368.         pascal void TAlnPrintView::DoPostCreate(TDocument itsDocument) // override 
  369.         
  370.         pascal void TAlnPrintView::InstallControls(void)
  371.         pascal void TAlnPrintView::AddSeqs(void)
  372.         pascal void TAlnPrintView::FindNameWidth(void)
  373.         pascal void TAlnPrintView::SetDrawOptions(void) 
  374.         
  375.         pascal void TAlnPrintView::DrawCell(GridCell aCell, VRect aRect) // override 
  376.         pascal void TAlnPrintView::DrawRangeOfCells(GridCell startCell, stopCell, VRect aRect) 
  377.                                                         // override 
  378.         pascal void TAlnPrintView::CalcMinFrame(VRect VAR minFrame) // override 
  379.         
  380.         pascal void TAlnPrintView::DoMenuCommand(CommandNumber aCommandNumber) // override 
  381.         pascal void TAlnPrintView::DoSetupMenus(void) // override 
  382.         }
  383.  
  384.     TAlnPrintDocument        == OBJECT (TFileBasedDocument) //? TSeqPrintDocument ?
  385.         fAlnPrintView    : TAlnPrintView;
  386.         fAlnPrintWind    : TAlnPrintWind;
  387.         fParentDoc        : TDocument;
  388.         fAlnList            : TSeqList; //list of TSequence in print view
  389.         longint        fFirstBase, fNBases; //index each TSequence
  390.         fColorButton, fMonoButton    : TIcon;
  391.         
  392.         pascal void TAlnPrintDocument::IAlnPrintDocument(OSType fileType, TDocument parentDoc, 
  393.                                         TSeqList        aAlnList; longint startbase, nbases)
  394.         pascal void TAlnPrintDocument::Free(void) // override 
  395.         pascal void TAlnPrintDocument::FreeData(void) // override 
  396.         pascal void TAlnPrintDocument::Close(void) /* override */ 
  397.  
  398.         pascal void TAlnPrintDocument::DoMakeViews(Boolean forPrinting) // override 
  399.         pascal void TAlnPrintDocument::UntitledName(Str255 VAR noName) // override 
  400.         pascal TFile TAlnPrintDocument::DoMakeFile(CommandNumber itsCommandNumber) // override 
  401.         pascal void TAlnPrintDocument::DoNeedDiskSpace(TFile itsFile,
  402.                                                             long VAR dataForkBytes, rsrcForkBytes) // override 
  403.         pascal void TAlnPrintDocument::DoRead(aFile:TFile; Boolean forPrinting) // override 
  404.         pascal void TAlnPrintDocument::DoWrite(TFile aFile, Boolean makingCopy) // override 
  405.         }
  406.  
  407.  
  408.     TDottyPlotDocument        == OBJECT; FORWARD;
  409.  
  410.     TDottyPlotWind            == OBJECT (TPrefWindow)
  411.         TNumberText        fNucWindow, fNucMatches;
  412.         fAllDots    : TCheckBox;
  413.         TButton        fRedrawBut;
  414.         
  415.         pascal void TDottyPlotWind::IDottyPlotWind(void)
  416.         pascal void TDottyPlotWind::SetPrefID(void) /* override */ 
  417.         pascal void TDottyPlotWind::DoEvent(EventNumber eventNumber, 
  418.                                             TEventHandler        source; TEvent event) // override 
  419.         }
  420.         
  421.     TDottyPlotView            == OBJECT (TView)
  422.         fAlnList        : TSeqList; //list of TSequence in print view
  423.         integer        fFirstBase, fNBases; //index each TSequence
  424.         fMinSize        : VPoint;
  425.         TNumberText        fNucWindow, fNucMatches;
  426.         fAllDots        : TCheckBox;
  427.         fDotsH            : Handle;
  428.         TSequence        fSeqH, fSeqV;
  429.         fDotRect        : Rect;
  430.         integer        fNucWindowVal, fNucMatchesVal;
  431.         
  432.         TDottyPlotDocument        fDottyPlotDocument;     
  433.         TScroller        fScroller;             
  434.  
  435.         pascal void TDottyPlotView::IDottyPlotView(TDottyPlotDocument itsDocument,
  436.                                         Boolean forClipboard)
  437.         pascal void TDottyPlotView::Free(void) // override 
  438.         pascal void TDottyPlotView::FreeData(void)
  439.  
  440.         pascal void TDottyPlotView::Initialize(void) // override 
  441.         pascal void TDottyPlotView::DoPostCreate(TDocument itsDocument) // override 
  442.         
  443.         pascal void TDottyPlotView::SetDotRect(void)
  444.         pascal void TDottyPlotView::FindDots(void)
  445.         
  446.         pascal void TDottyPlotView::CalcMinFrame(VRect VAR minFrame) // override 
  447.  
  448.         pascal void TDottyPlotView::DoMenuCommand(CommandNumber aCommandNumber) // override 
  449.         pascal void TDottyPlotView::DoSetupMenus(void) // override 
  450.  
  451.         pascal void TDottyPlotView::Draw(VRect area) // override 
  452.         }
  453.         
  454.     TDottyPlotDocument        == OBJECT (TFileBasedDocument)
  455.         fDottyPlotView    : TDottyPlotView;
  456.         fDottyPlotWind    : TDottyPlotWind;
  457.         fParentDoc            : TDocument;
  458.         fAlnList                : TSeqList; //list of TSequence in print view
  459.         longint        fFirstBase, fNBases; //index each TSequence
  460.         
  461.         pascal void TDottyPlotDocument::IDottyPlotDocument(OSType fileType, TDocument parentDoc, 
  462.                                         TSeqList        aAlnList; longint startbase, nbases)
  463.         pascal void TDottyPlotDocument::Free(void) // override 
  464.         pascal void TDottyPlotDocument::FreeData(void) // override 
  465.  
  466.         pascal void TDottyPlotDocument::DoMakeViews(Boolean forPrinting) // override 
  467.         pascal void TDottyPlotDocument::UntitledName(Str255 VAR noName) // override 
  468.         pascal TFile TDottyPlotDocument::DoMakeFile(CommandNumber itsCommandNumber) // override 
  469.         pascal void TDottyPlotDocument::DoNeedDiskSpace(TFile itsFile,
  470.                                                             long VAR dataForkBytes, rsrcForkBytes) // override 
  471.         pascal void TDottyPlotDocument::DoRead(aFile:TFile; Boolean forPrinting) // override 
  472.         pascal void TDottyPlotDocument::DoWrite(TFile aFile, Boolean makingCopy) // override 
  473.         }
  474.  
  475.     TDottyPlotHandler            == OBJECT (TStdPrintHandler)
  476.         fAlnList        : TSeqList;  
  477.         pascal void TDottyPlotHandler::IDottyPlotHandler(TDocument itsDocument, TView itsView,
  478.                                             Boolean itsSquareDots, itsHFixedSize, itsVFixedSize)
  479.         pascal VCoordinate TDottyPlotHandler::BreakFollowing(VHSelect vhs,  VCoordinate previousBreak,
  480.                                 Boolean VAR automatic) // override 
  481.         }
  482.     
  483.     
  484.     TTreePrintDocument        == OBJECT; FORWARD;
  485.                                 
  486.     TTreePrintWind            == OBJECT (TPrefWindow)
  487.         fStylePop        : TPopup;
  488.         fRedrawBut    : TButton;
  489.         TCluster        fGrowCluster, fNodeCluster;
  490.         
  491.         pascal void TTreePrintWind::ITreePrintWind(void)
  492.         pascal void TTreePrintWind::SetPrefID(void) /* override */ 
  493.         pascal void TTreePrintWind::DoEvent(EventNumber eventNumber, 
  494.                                             TEventHandler        source; TEvent event) // override 
  495.         }
  496.             
  497.     TTreePrintView            == OBJECT (TView)
  498.         fTreeData        : Handle;
  499.         fParams            : Handle;
  500.         fRoot                : Handle; //to tree node recs 
  501.         
  502.         Real        fRooty, fExpand, fLabelheight, fLabelrotation;
  503.         fPlotNodeNum    : Boolean;
  504.         
  505.         fMinSize        : VPoint;
  506.         fStyle            : integer;
  507.         fStylePop        : TPopup;
  508.         fHoriz            : TRadio;
  509.         fFixed            : TCheckBox;
  510.         fNodeLen        : TCheckBox;
  511.         fNodeCluster    : TCluster;
  512.         fRedrawBut    : TButton;
  513.         
  514.         TTreePrintDocument        fTreePrintDocument;     
  515.         TScroller        fScroller;             
  516.  
  517.         pascal void TTreePrintView::ITreePrintView(TTreePrintDocument itsDocument,
  518.                                         Boolean forClipboard)
  519.         pascal void TTreePrintView::Free(void) // override 
  520.         pascal void TTreePrintView::FreeData(void)
  521.  
  522.         pascal void TTreePrintView::Initialize(void) // override 
  523.         pascal void TTreePrintView::DoPostCreate(TDocument itsDocument) // override 
  524.                 
  525.         pascal void TTreePrintView::ForEachNodeDo( pascal void DoThis( aNode: UNIV Handle));
  526.         pascal void TTreePrintView::CalcTree(void)
  527.  
  528.         pascal void TTreePrintView::CalcMinFrame(VRect VAR minFrame) // override 
  529.  
  530.         pascal void TTreePrintView::DoMenuCommand(CommandNumber aCommandNumber) // override 
  531.         pascal void TTreePrintView::DoSetupMenus(void) // override 
  532.  
  533.         pascal void TTreePrintView::Draw(VRect area) // override 
  534.         }
  535.         
  536.     TTreePrintDocument        == OBJECT (TFileBasedDocument)
  537.         fTreeData        : Handle;
  538.         fParams            : Handle;
  539.         fTreePrintView    : TTreePrintView;
  540.         fTreePrintWind    : TTreePrintWind;
  541.         fParentDoc        : TDocument;
  542.         
  543.         pascal void TTreePrintDocument::ITreePrintDocument(OSType fileType, 
  544.                                                                         Handle        treeData, params; TFile itsFile)
  545.         pascal void TTreePrintDocument::Free(void) // override 
  546.         pascal void TTreePrintDocument::FreeData(void) // override 
  547.  
  548.         pascal void TTreePrintDocument::DoMakeViews(Boolean forPrinting) // override 
  549.         pascal void TTreePrintDocument::UntitledName(Str255 VAR noName) // override 
  550.         pascal TFile TTreePrintDocument::DoMakeFile(CommandNumber itsCommandNumber) // override 
  551.         pascal void TTreePrintDocument::DoNeedDiskSpace(TFile itsFile,
  552.                                                             long VAR dataForkBytes, rsrcForkBytes) // override 
  553.         pascal void TTreePrintDocument::DoRead(aFile:TFile; Boolean forPrinting) // override 
  554.         pascal void TTreePrintDocument::DoWrite(TFile aFile, Boolean makingCopy) // override 
  555.         }
  556.  
  557.     TTreePrintHandler            == OBJECT (TStdPrintHandler)
  558.         pascal void TTreePrintHandler::ITreePrintHandler(TDocument itsDocument, TView itsView,
  559.                                             Boolean itsSquareDots, itsHFixedSize, itsVFixedSize)
  560.         pascal VCoordinate TTreePrintHandler::BreakFollowing(VHSelect vhs,  VCoordinate previousBreak,
  561.                                 Boolean VAR automatic) // override 
  562.         }
  563.         
  564.  
  565.  
  566.     TREMapDocument        == OBJECT; FORWARD; 
  567.  
  568.     TREMapWind            == OBJECT (TPrefWindow)/*! subclass TSeqPrintWind...*/ 
  569.         TButton        fRedrawBut;
  570.     
  571.         pascal void TREMapWind::IREMapWind(void)
  572.         pascal void TREMapWind::SetPrefID(void) /* override */ 
  573.         pascal void TREMapWind::DoEvent(EventNumber eventNumber, 
  574.                                             TEventHandler        source; TEvent event) // override 
  575.         }
  576.         
  577.     TREMapView            == OBJECT (TGridView)  /*! subclass TSeqPrintView...*/ 
  578.         fSeq        : TSequence;  
  579.         integer        fFirstBase, fNBases; //index each TSequence
  580.  
  581.         fLeftName, fRightName, 
  582.         TCheckBox        fTopIndex, fLeftIndex, fRightIndex ;
  583.         TDlogTextView        fStyleName, fStyleBase, fStyleNums; 
  584.         TextStyle        fNameStyle, fNumStyle, fBaseStyle;
  585.  
  586.         fDoTopIndex, fDoLeftIndex, fDoRightIndex, 
  587.         boolean        fUseColor, fDoLeftName, fDoRightName;
  588.         Integer        fNameWidth, fIndexWidth, fBaseWidth;
  589.         Integer        fBasesPerLine, fTenSpacer;
  590.         
  591.         TREMapDocument        fREMapDocument; 
  592.         
  593.             //! added for REMap...............
  594.         fREMap        : TREMap;
  595.         fCutList    :    RECutsHandle;
  596.         TCheckBox        fNoncutters, fCutpoints, fAllzymes, fShowCoseq, fShowindex;
  597.         fMincuts, fMaxcuts    : TNumberText;
  598.         CharsHandle        fProt, fCoProt;
  599.         fSeqFrame1, fSeqFrame2, fSeqFrame3,
  600.         fCoFrame1, fCoFrame2, fCoFrame3    : TCheckBox;
  601.         TRadio        fThreeBase;
  602.         Integer        fSeqRowHeight;
  603.         Integer        fLastZymeCut;
  604.  
  605.         Integer        fAllZymesStart, fAllZymesEnd;
  606.         Integer        fNoCutsStart, fNoCutsEnd;
  607.         Integer        fCutpointStart, fCutpointEnd;
  608.         
  609.         pascal void TREMapView::Free(void) // override */ /*!
  610.         pascal void TREMapView::IREMapView(TREMapDocument itsDocument,
  611.                                     Boolean forClipboard)
  612.         pascal void TREMapView::Initialize(void) // override */ /*!
  613.         pascal void TREMapView::DoPostCreate(TDocument itsDocument) // override 
  614.         
  615.         pascal void TREMapView::InstallControls(void)//!
  616.         pascal void TREMapView::FindNameWidth(void)//!
  617.         pascal void TREMapView::SetDrawOptions(void) //!
  618.         pascal void TREMapView::AddSeqs(void) //! added for REMap...
  619.         pascal void TREMapView::DrawZymeLine(integer startCellh, startBase, endBase, 
  620.                                             VRect        aRect; Boolean doDraw, Integer VAR lineHeight)
  621.  
  622.         pascal void TREMapView::AllZymeTabRows( Integer VAR nRows, rowHeight)
  623.         pascal void TREMapView::AllZymeTable( integer atRow, VRect aRect)
  624.         pascal void TREMapView::NocuttersRows( Integer VAR nRows, rowHeight)
  625.         pascal void TREMapView::NocuttersTab( integer atRow, VRect aRect)
  626.         pascal void TREMapView::CutpointsRows( Integer VAR nRows, rowHeight)
  627.         pascal void TREMapView::CutpointsTab( integer atRow, VRect aRect)
  628.         
  629.         pascal void TREMapView::DrawCell(GridCell aCell, VRect aRect) // override */ /*!
  630.         pascal void TREMapView::DrawRangeOfCells(GridCell startCell, stopCell, VRect aRect) 
  631.                                                         // override 
  632.         pascal void TREMapView::CalcMinFrame(VRect VAR minFrame) // override 
  633.         
  634.         pascal void TREMapView::DoMenuCommand(CommandNumber aCommandNumber) // override 
  635.         pascal void TREMapView::DoSetupMenus(void) // override 
  636.         }
  637.  
  638.     TREMapDocument        == OBJECT (TFileBasedDocument)/*! subclass TSeqPrintDocument...*/ 
  639.         fREMapView    : TREMapView;
  640.         fREMapWind    : TREMapWind;
  641.         fParentDoc        : TDocument;
  642.         fSeq                    : TSequence;  
  643.         longint        fFirstBase, fNBases; //index each TSequence
  644.         fColorButton, fMonoButton    : TIcon;
  645.         
  646.         pascal void TREMapDocument::IREMapDocument(OSType fileType, TDocument parentDoc, 
  647.                                         TSequence        aSeq; longint startbase, nbases)
  648.         pascal void TREMapDocument::Free(void) // override 
  649.         pascal void TREMapDocument::FreeData(void) // override 
  650.         pascal void TREMapDocument::Close(void) /* override */ 
  651.  
  652.         pascal void TREMapDocument::DoMakeViews(Boolean forPrinting) // override 
  653.         pascal void TREMapDocument::UntitledName(Str255 VAR noName) // override 
  654.         pascal TFile TREMapDocument::DoMakeFile(CommandNumber itsCommandNumber) // override 
  655.         pascal void TREMapDocument::DoNeedDiskSpace(TFile itsFile,
  656.                                                             long VAR dataForkBytes, rsrcForkBytes) // override 
  657.         pascal void TREMapDocument::DoRead(aFile:TFile; Boolean forPrinting) // override 
  658.         pascal void TREMapDocument::DoWrite(TFile aFile, Boolean makingCopy) // override 
  659.         }
  660.  
  661.  
  662.  
  663. VAR
  664.     RGBColor        gGray50, gGray75, gGray25; 
  665.     RGBColor        gAcolor, gCcolor, gGcolor, gTcolor, gNcolor; 
  666.     gPrintZymeStyle, gPrintNucStyle,gPrintNameStyle    : TextStyle;
  667.  
  668.         
  669. IMPLEMENTATION
  670.  
  671.         //$I USeqPrint.seq.p
  672.         //$I USeqPrint.aln.p
  673.         //$I USeqPrint.dotty.p
  674.         //$I USeqPrint.tree.p
  675.         //$I USeqPrint.remap.p
  676.  
  677. }
  678.